package com.cn.jani.service.impl;

import java.math.BigDecimal;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cn.jani.dao.InquiryDao;
import com.cn.jani.dao.UserDao;
import com.cn.jani.pojo.Inquiry;
import com.cn.jani.pojo.User;
import com.cn.jani.service.UserService;

@Service("userService")
public class UserServiceImpl implements UserService{
	
	@Resource
	private UserDao userDao;
	
	@Resource
	private InquiryDao inquiryDao;
	

	@Override
	public User getUserById(long id) {
		return this.userDao.selectByPrimaryKey(new BigDecimal(id));
	}

	@Override
	public void addUser(User user) {
		this.userDao.insert(user);
	}

	@Override
	public void addInquiry(Inquiry inquiry) {
		this.inquiryDao.insert(inquiry);
	}

}
